﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KnowledgeBaseIntermediary;

namespace OutputHandler
{
    /// <summary>
    /// This class is used to handle outgoing data. It will do TTS Conversion, send text to the visual output and send UDP Commands to the Home Server.
    /// </summary>
    public class OutputHandler_Impl : IOutputHandler
    {
        private TTS tts;
        private UDPClient udp;
        public OutputHandler_Impl()
        {
            tts = new TTS();
            udp = new UDPClient(10, 10, 10, 10);
        }
        
        public bool spill(OutputObject outputObject)
        {
            //TODO:Visual stuff here!!
            tts.say(outputObject.getTtsText());
            return true;
        }
        

        public bool sendCommand(CommandObject commandObject)
        {
            //udp.sendData(commandObject.getUdpString());
            return spill(commandObject.getOutputObject());
        }
    }
}
